<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="/WEB-TAG/platForm.tld" prefix="PF"%>
<!--部署流程-->
<div class="easyui-layout" data-options="fit:true">
	<div class="TableTitle" data-options="region:'north',border:false">
		<c:if test="${pageset.pageType==1}">新增${JSP_Messager_Title}记录</c:if>
		<c:if test="${pageset.pageType==2}">修改${JSP_Messager_Title}记录</c:if>
		<c:if test="${pageset.pageType==0}">浏览${JSP_Messager_Title}记录</c:if>
	</div>
	<div data-options="region:'center'">
		<form id="dom_formactreprocdef">
			<input type="hidden" name="ids" value="${ids}">
			<table class="editTable">
				<c:if test="${pageset.pageType==1}">
					<tr>
						<td class="title">
							流程定义文件:
						</td>
						<td colspan="3">
							<input type="text" style="width: 260px;"
								class="easyui-validatebox"
								data-options="required:true,validType:',maxLength[64]'"
								id="file_name">
							<input type="button" id="uploadButton" value="上传BPMN2.0文件(xml)" />
							<input type="hidden" id="entity_fileid" name="id" value="">
						</td>
					</tr>
					<script type="text/javascript">
	$(function() {
		var uploadbutton;
		uploadbutton = KindEditor.uploadbutton( {
			button : KindEditor('#uploadButton')[0],
			fieldName : 'xmlFile',
			url : 'admin/uploadXmlFile.do',
			afterUpload : function(data) {
				if (data.error === 0) {
					$('#file_name').val(data.xmlFileFileName);
					$("#entity_fileid").val(data.id);
				} else {
					if (data.message) {
						alert(data.message);
					} else {
						alert('请检查文件格式');
					}
				}
			},
			afterError : function(str) {
				alert('自定义错误信息: ' + str);
			}
		});
		uploadbutton.fileBox.change(function(e) {
			uploadbutton.submit();
		});

	});
</script>
				</c:if>
				<tr>
					<td class="title">
						流程分类:
					</td>
					<td colspan="3">
						<select name="flowType" val="${flowType}">
							<option value="NONE">
								无
							</option>
							<PF:OptionDictionary index="BPM_PROTYPE" isTextValue="1" />
						</select>
					</td>
				</tr>
				<c:if test="${pageset.pageType!=1}">
					<tr>
						<td class="title">
							主题信息展示格式:
						</td>
						<td colspan="3">
							<textarea rows="2" name="titleDes" class="easyui-validatebox"
								data-options="required:true,validType:',maxLength[2000]'">${titleDes}</textarea>
						</td>
					</tr>
				</c:if>
			</table>
		</form>
	</div>
	<div data-options="region:'south',border:false">
		<div class="div_button" style="text-align: center; padding: 4px;">
			<c:if test="${pageset.pageType==1}">
				<a id="dom_add_entityactreprocdef" href="javascript:void(0)"
					iconCls="icon-save" class="easyui-linkbutton">增加</a>
			</c:if>
			<c:if test="${pageset.pageType==2}">
				<a id="dom_edit_entityactreprocdef" href="javascript:void(0)"
					iconCls="icon-save" class="easyui-linkbutton">修改</a>
			</c:if>
			<a id="dom_cancle_formactreprocdef" href="javascript:void(0)"
				iconCls="icon-cancel" class="easyui-linkbutton"
				style="color: #000000;">取消</a>
		</div>
	</div>
</div>
<script type="text/javascript">
	var submitAddActionactreprocdef = 'admin/ActReProcdefaddCommit.do';
	var submitEditActionactreprocdef = 'admin/ActReProcdefeditCommit.do';
	var currentPageTypeactreprocdef = '${pageset.pageType}';
	var submitFormactreprocdef;
	$(function() {
		//表单组件对象
		submitFormactreprocdef = $('#dom_formactreprocdef').SubmitForm( {
			pageType : currentPageTypeactreprocdef,
			grid : gridactreprocdef,
			currentWindowId : 'winactreprocdef'
		});
		//关闭窗口
		$('#dom_cancle_formactreprocdef').bind('click', function() {
			$('#winactreprocdef').window('close');
		});
		//提交新增数据
		$('#dom_add_entityactreprocdef').bind('click', function() {
			submitFormactreprocdef.postSubmit(submitAddActionactreprocdef);
		});
		//提交修改数据
		$('#dom_edit_entityactreprocdef').bind('click', function() {
			submitFormactreprocdef.postSubmit(submitEditActionactreprocdef);
		});
	});
	//-->
</script>